import org.springframework.context.ApplicationContext;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;

public class Main {
    public static void main(String[] args) {
        // 初始化Spring容器
        ApplicationContext context = new AnnotationConfigApplicationContext(AppConfig.class);

        // 获取User Bean
        User user = context.getBean(User.class);

        // 打印User对象
        System.out.println(user);
    }
}